#pragma once
#include "image2d_ptr.h"

namespace Image2D
{
IMAGE2D_API int rgbToNv12   (const Image2D_Ptr& input, Image2D_Ptr& output);
IMAGE2D_API int rgbToYuv420p(const Image2D_Ptr& input, Image2D_Ptr& output);
IMAGE2D_API int rgbToBgr    (const Image2D_Ptr& input, Image2D_Ptr& output);

IMAGE2D_API int nv12ToRgb    (const Image2D_Ptr& input, Image2D_Ptr& output);
IMAGE2D_API int nv12ToYuv420p(const Image2D_Ptr& input, Image2D_Ptr& output);
IMAGE2D_API int nv12ToBgr    (const Image2D_Ptr& input, Image2D_Ptr& output);

IMAGE2D_API int yuv420pToNv12(const Image2D_Ptr& input, Image2D_Ptr& output);
IMAGE2D_API int yuv420pToRgb (const Image2D_Ptr& input, Image2D_Ptr& output);
IMAGE2D_API int yuv420pToBgr (const Image2D_Ptr& input, Image2D_Ptr& output);

IMAGE2D_API int bgrToNv12   (const Image2D_Ptr& input, Image2D_Ptr& output);
IMAGE2D_API int bgrToYuv420p(const Image2D_Ptr& input, Image2D_Ptr& output);
IMAGE2D_API int bgrToRgb    (const Image2D_Ptr& input, Image2D_Ptr& output);

IMAGE2D_API int rgbaToBgra(const Image2D_Ptr& input, Image2D_Ptr& output);
IMAGE2D_API int bgraToRgba(const Image2D_Ptr& input, Image2D_Ptr& output);

/**********************************************************************************************************/

IMAGE2D_API int rgbToNv12   (const Image2D_Ptr& input, Image2D_Ptr& output, void* stream);
IMAGE2D_API int rgbToYuv420p(const Image2D_Ptr& input, Image2D_Ptr& output, void* stream);
IMAGE2D_API int rgbToBgr    (const Image2D_Ptr& input, Image2D_Ptr& output, void* stream);

IMAGE2D_API int nv12ToRgb    (const Image2D_Ptr& input, Image2D_Ptr& output, void* stream);
IMAGE2D_API int nv12ToYuv420p(const Image2D_Ptr& input, Image2D_Ptr& output, void* stream);
IMAGE2D_API int nv12ToBgr    (const Image2D_Ptr& input, Image2D_Ptr& output, void* stream);

IMAGE2D_API int yuv420pToNv12(const Image2D_Ptr& input, Image2D_Ptr& output, void* stream);
IMAGE2D_API int yuv420pToRgb (const Image2D_Ptr& input, Image2D_Ptr& output, void* stream);
IMAGE2D_API int yuv420pToBgr (const Image2D_Ptr& input, Image2D_Ptr& output, void* stream);

IMAGE2D_API int bgrToNv12   (const Image2D_Ptr& input, Image2D_Ptr& output, void* stream);
IMAGE2D_API int bgrToYuv420p(const Image2D_Ptr& input, Image2D_Ptr& output, void* stream);
IMAGE2D_API int bgrToRgb    (const Image2D_Ptr& input, Image2D_Ptr& output, void* stream);

IMAGE2D_API int rgbaToBgra(const Image2D_Ptr& input, Image2D_Ptr& output, void* stream);
IMAGE2D_API int bgraToRgba(const Image2D_Ptr& input, Image2D_Ptr& output, void* stream);

}